<template>
  <div class="merchant">
    <div class="Header">
      <div class="Title">
        <div class="merchant_title">
          <p>{{sellerdata.name}}</p>
          <p>
            <van-rate
              v-model="value"
              :size="12"
              color="rgb(255, 111, 15)"
              void-icon="star"
              void-color="#eee"
              readonly
            />
            <span>({{sellerdata.minPrice}})</span> <span>月售<span>{{sellerdata.sellCount}}</span>单</span>
          </p>
        </div>
        <div class="merchant_title_2">
          <p><i class="iconfont icon-aixin">  </i></p>
          <span>收藏</span>
        </div>
      </div>
      <div class="Title2">
        <div class="Title2_main">
          <span>起送价</span>
          <p><span>{{sellerdata.minPrice}}</span>元</p>
        </div>
        <div class="Title2_main Title2_main_two">
          <span>商家配送</span>
          <p><span>{{sellerdata.deliveryPrice}}</span>元</p>
        </div>
        <div class="Title2_main">
          <span>平均配送时间</span>
          <p><span>{{sellerdata.deliveryTime}}</span>分钟</p>
        </div>
      </div>
    </div>

    <!-- 公告 -->
    <div class="Notice">
      <div class="Notice_title">
        <span>活动与公告</span>
        <p>{{sellerdata.bulletin}}</p>
      </div>
      <div class="Notice_main">
        <p v-for="index in sellerdata.supports" :key="index"><span class="reduce">减</span> {{index}}</p>
      
      </div>
    </div>

    <!-- 照片墙 -->
    <div class="pics">
      <p>商家实景</p>
      <div class="pics_1">
        <img :src="index" alt="1111"  v-for="index in sellerdata.pics" :key="index">
      
      </div>

    </div>

    <!-- 商家信息 -->
    <div class="information">
      <span>商家信息</span>
      <p>{{sellerdata.description}}</p>
   <p>
          该商家支持发票,请下单写好发票抬头
        </p>
        <p>
          品类:其他菜系,包子粥店
        </p>
        <p>
          北京市昌平区回龙观西大街龙观置业大厦底商B座102单元1340
        </p>
   
    </div>

  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { $_getseller } from "@/apis/goods"; //商家数据接口
import { ISeller } from "../../interface/goodsinterface"; //约束商家

@Component
export default class Merchant extends Vue {
  value: any = 0;//星星评分
  sellerdata: ISeller = {}; //约束商家信息

  created(): void {
    //获取商家数据
    $_getseller().then((res) => {
      //商家数据
      this.sellerdata = res.data.data;

      // console.log(res.data.data, 1111);

      this.value = this.sellerdata.score; //赋值评分
    });
  }
}
</script>

<style scoped lang='scss'>
//背景
.merchant {
  background-color: rgb(245, 245, 245);
  height: 100%;
  overflow-y: scroll;

}
//隐藏右侧滚动条
.merchant::-webkit-scrollbar {
  display: none;
}

//头部
.Header {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  margin-bottom: 15px;
  height: 154px;
  width: 100%;
}
.Title {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  background-color: #fff;
  align-items: center;
  width: 90%;
  height: 30px;
  border-bottom: 1px solid rgb(245, 245, 245);
}
.merchant_title {
  & > p:nth-of-type(2) {
    line-height: 30px;
    font-size: 10px;
    & > span {
      margin-left: 15px;
      color: rgb(180, 180, 180);
    }
  }
}
.merchant_title_2 {
  // background-color: rgb(214, 90, 90);
  font-size: 12px;
  width: 80px;

  text-align: center;
  span {
    color: rgb(180, 180, 180);
    font-size: 10px;
  }
}

//起送价格
.Title2 {
  height: 30px;
  display: flex;
  justify-content: space-between;
  // flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: 20px 0;
  width: 100%;
  .Title2_main {
    width: 150px;
    // background-color: rgb(226, 126, 126);
    text-align: center;
    font-size: 12px;
    & > span {
      color: rgb(180, 180, 180);
    }
    p {
      line-height: 35px;
      span {
        font-size: 22px;
      }
    }
  }
  .Title2_main_two {
    border-right: 1px solid rgb(245, 245, 245);
    border-left: 1px solid rgb(245, 245, 245);
  }
}

//公告
.Notice {
  padding: 20px 0 0;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;

  .Notice_title {
    width: 90%;
    // border-bottom: 1px solid rgb(245, 245, 245);
    padding-bottom: 20px;
    // height: 40px;
    box-sizing: border-box;
    & > span {
      font-size: 16px;
      // font-weight: bold;
      margin-bottom: 10px;
      display: block;
    }
    p {
      font-size: 13px;
      color: rgb(255, 101, 29);
      font-weight: bold;
    }
  }
  .Notice_main {
    width: 90%;
    font-size: 14px;
    overflow: hidden;
    // background-color: rgb(158, 82, 82);
    padding: 10px 25px;
    p{
      line-height: 50px;
      border-top:  1px solid rgb(245, 245, 245);
    }
  }
}


//logo
 .reduce {
          background-color: rgb(245, 69, 69);
          width: 26px;
          color: #fff;
          margin-right: 5px;
          //基线
          // display: inline-block;
          font-size: 10px;
          // vertical-align: text-bottom;
          text-align: center;
          border-radius: 2px;
        }

.icon-aixin{
  color: red;
}


  // 照片墙
  .pics{
    width: 100%;
    height: 125px;
    background-color: rgb(255, 255, 255);
    padding: 15px 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: 20px;

    p{
      margin-bottom: 10px;
      display: block;
      width: 90%;
    }
    .pics_1{
      height: 90px;
      width: 90%;
      overflow-x: scroll;
      display: flex;
      box-sizing: border-box;
  
      img{
        height: 88px;
        width: 120px;
        margin-right: 10px;
        border:1px solid rgb(224, 224, 224);
      }


    }      .pics_1::-webkit-scrollbar {
  display: none;
}
  }


  .information{
    width: 100%;
   
    background-color: rgb(255, 255, 255);
    padding: 15px 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: 20px;
 box-sizing: border-box;
//  height: 100%;
    span{
      display: block;
      width: 90%;
      margin-bottom: 20px;
    }

    &>p{

      display: block;
      width: 90%;
      font-size: 10px;
       border-top:1px solid rgb(236, 236, 236);
    
       padding-left: 10px;
       line-height: 40px;

      

    }}
</style>